<template>
	<view>
		<view class="list-item" v-for="item in data" :key="item._id" @click="toDetailPage(item._id)">
			<image :src="item.imagePath" class="list-item-image" mode=""></image>
			<text>{{item.name}}</text>
		</view>
	</view>
</template>

<script setup>
	defineProps(['data']);
	const toDetailPage = (_id) => {
		uni.navigateTo({
			url: '/cookbookPackage/pages/detail/detail?_id=' + _id
		})
	}
</script>

<style scoped lang="scss">
	.list-item-image {
		width: 314rpx;
		height: 210rpx;
		border-radius: 14rpx;
	}
</style>